<!--
  ~ MIT License
  ~
  ~ Copyright (c) 2021-2022 yangrunkang
  ~
  ~ Author: yangrunkang
  ~ Email: yangrunkang53@gmail.com
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="index">
<!--css-->
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/user/manage/edit-user-info.css}"/>
<!--脚本-->
<script async="async" th:fragment="js" type="text/javascript" th:src="${ossStatic} + @{/js/user/manage/edit-user-info.js}"></script>
<div th:fragment="content">
    <!--内容管理-->
    <div class="container">
        <div class="row g-2">
            <!--右列-->
            <div class="col-lg-9 mb-2">
                <div class="card border-0 rounded-3 p-2 mb-2">
                    <div th:replace="fragments/manage::user_settings('editUserInfo')"></div>
                    <form class="ui form">
                        <div class="field">
                            <label>用户名</label>
                            <input type="text" th:value="${memberIndexDto.memberEnhance.member.userName}" id="userName" placeholder="用户名">
                        </div>
                        <div class="field">
                            <label>邮箱</label>
                            <input type="text" th:value="${memberIndexDto.memberEnhance.member.email}" id="email" disabled placeholder="邮箱">
                        </div>
                        <div class="field">
                            <label>简介</label>
                            <textarea type="text" rows="2" class="field" id="introduce" th:text="${memberIndexDto.memberEnhance?.memberExtendEnhance?.memberExtend.introduce}" placeholder="简介"></textarea>
                        </div>
                        <div class="field">
                            <label>邮件开关</label>
                            <div class="ui toggle checkbox">
                                <input th:checked="${memberIndexDto?.memberEnhance?.memberConfigEnhance?.memberConfig?.openEmail.name() == 'SUBSCRIBE_EMAIL'}" type="checkbox" id="openEmail">
                                <label></label>
                            </div>
                        </div>
                        <button class="ui primary button" type="submit" id="register">更新用户信息</button>
                    </form>
                </div>
            </div>
            <!--左列-用户信息-->
            <div class="col-lg-3">
                <div th:include="fragments/index::user_index_left"></div>
            </div>
        </div>
    </div>
</div>
</html>
